﻿namespace WayneGameSolution
{
    using System;

    public interface IReturnValue
    {
        System.Exception Exception { get; set; }

        object  Value { get; set; }

        Type ValueType { get; }

        bool Sucess { get; set; }

        object Tag { get; set; }
    }

    public struct ReturnValue<T> : IReturnValue
    {
        public System.Exception Exception { get; set; }

        public T Value { get; set; }

        public bool Sucess { get; set; }

        public object Tag { get; set; }

        #region IReturnValue Members



         object IReturnValue.Value
        {
            get
            {
                return Value;
            }
            set
            {
               Value = (T) value;
            }
        }

        public Type ValueType
        {
            get { return typeof(T); }
        }

     

      



     

        #endregion


    }
}

